package cn.exrick.xboot.enterpriseUser.controllerImp

import cn.exrick.xboot.base.entity.EnterpriseUser
import cn.exrick.xboot.base.service.IEnterpriseEmployeeService
import cn.exrick.xboot.base.service.IEnterpriseUserService
import cn.exrick.xboot.base.service.ISupervisionUserService
import cn.exrick.xboot.base.vo.EmployeeInfoVo
import cn.exrick.xboot.base.vo.MyCompanyInfoVo
import cn.exrick.xboot.base.vo.UserCommonVo
import cn.exrick.xboot.core.common.vo.Result
import cn.exrick.xboot.enterpriseUser.controller.IEnterpriseUserController
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.RestController

@RestController
open class EnterpriseUserController: IEnterpriseUserController.EnterPriseUser {

    @Autowired
    private lateinit var iEnterpriseUserService: IEnterpriseUserService

    @Autowired
    private lateinit var iEnterpriseEmployeeService: IEnterpriseEmployeeService

    @Autowired
    private lateinit var iSupervisionUserService: ISupervisionUserService

    override fun getSupervisionMessageByArea(): Result<List<UserCommonVo>>? {

        return iSupervisionUserService.getSupervisionMessageByArea()
    }


    override fun getEmployeeInfo(employeeUserId: String?): Result<EmployeeInfoVo?>? {

        return iEnterpriseEmployeeService.getEmployeeInfo(employeeUserId)
    }


    override fun insertCompanyInfo(enterpriseUser: EnterpriseUser, code: String?, checkuserId: String): Result<Any?>? {

        return iEnterpriseUserService.insertCompanyInfo(enterpriseUser, code, checkuserId)
    }

    override fun getMyCompanyInfo(): Result<MyCompanyInfoVo>? {

        return iEnterpriseUserService.getMyCompanyInfo();
    }

    override fun getUserByType(type: Int): Result<List<UserCommonVo>>? {

        return iEnterpriseEmployeeService.getUserByType(type)
    }


}
